<?php  $this->load->view('admin/contact/link_bar');?>
		<form method="post" action="<?php echo base_url()?>admin/contact/detail" class="form">

<div class="box_function">
		<table width="747" border="0" cellpadding="0" cellspacing="0" class="listproduct" id="listproduct">
		<tr>
			<td colspan="2" style="padding:5px; background-color:#CCCCCC ">
				Người gửi:
				<strong><?php echo $contact->fullname?></strong>
			</td>
		</tr>
		<tr>
			<td style="padding:5px; border-bottom:1px solid #CCCCCC;">
				Địa chỉ:
				<strong><?php echo $contact->address?></strong>
			</td>
			<td style="padding:5px; border-bottom:1px solid #CCCCCC; ">
				Email:
				<strong><?php echo $contact->email?></strong>
			</td>
		</tr>
		<tr>
			<td  style="padding:5px;; border-bottom:1px solid #CCCCCC;">
				Điện thoại:
				<strong><?php echo $contact->phone?></strong>
			</td>
			<td  style="padding:5px; border-bottom:1px solid #CCCCCC; ">
				Fax:
				<strong><?php echo $contact->fax?></strong>
			</td>
		</tr>
		<tr>
			<td colspan="2"  style="padding:5px; border-bottom:1px solid #CCCCCC; ">
				Tiêu đề:
				<strong><?php echo $contact->title?></strong>
			</td>
		</tr>
		<tr>
			<td colspan="2"  style="padding:5px ">
				Nội dung: <br>
			
				<?php echo $contact->content?>
			</td>
		</tr>
		<tr>
			<td colspan="2" style="padding:5px ">
			<script language="javascript">
				function show(){
					var display = document.getElementById('box_reply').style.display;
					if(display=='none')
						document.getElementById('box_reply').style.display = 'block';
					else 
						document.getElementById('box_reply').style.display = 'none';
				}
				
				function send(){
					var title = document.getElementById('txtTitle').value;
					var content = document.getElementById('txtContend').value;
					var message
					if(title==''){
						alert('Chưa nhập tiêu đề');
						document.getElementById('txtTitle').focus();
						return;
					}
					if(content==''){
						alert('Chưa nhập nội dung');
						document.getElementById('txtTitle').focus();
						return;
					}
					
								
					xajax_reply(<?php echo $contact->id?>, title, content);
				}
			</script>
			<p align="left">
			<input  style="display:none " class="button" name="submitDelcategory" value="Trả lời" onclick="show();" type="button">
			
			<div id="box_reply" style="display:none ">
			<table align="left">
				<tr>
					<td>Tiêu đề:</td>
					<td><input type="text" name="txtTitle" id="txtTitle" value="Re:<?php echo $contact->title?>" style="width:200px; "></td>
				</tr>
				<tr>
					<td>Nội dung</td>
					<td><textarea name="txtContent" id="txtContent" cols="50" rows="9"></textarea></td>
				</tr>
				<tr>
					<td></td>
					<td><input class="button" type="button" onClick="send();" value="Gửi"></td>
				</tr>
			</table>
			 		
			</div>
			</p>	
			</td>
		</tr>
</table>
</div>
		</form>